<script setup>
import {ref,onMounted,onBeforeUnmount,defineProps} from "vue"
import axios from "axios"
import animeModel1 from "../../components/animeModel1.vue"
import animeModel2 from "../../components/animeModel2.vue"

const MQSSVideoUrl = ref("")
const MQSSName = ref("")
const MQSSFanName = ref("")
const fan1Url = ref("")
const fan2Url = ref("")
const fan_fm = ref("")
const fan_name = ref("")

axios.get("/go1-api/anime/mqss").then(async res=>{
    // console.log(res.data[0])
    console.log
    MQSSName.value = await res.data[0].name
    MQSSVideoUrl.value = await res.data[0].anime_msg[0].fan_player
    fan1Url.value = await res.data[0].anime_msg[0].fan_player
    fan2Url.value = await res.data[0].anime_msg[1].fan_player
    fan_name.value = await res.data[0].name
    fan_fm.value = await res.data[0].anime_image
    MQSSFanName.value = await "萌妻食神 - " + res.data[0].anime_msg[0].fan_name
    document.title = await MQSSFanName.value
}).catch(err=>console.log(err))

onMounted(()=>{
    document.title = "萌妻食神 - 番剧|EvenSO"
})

</script>

<template>
    <div class="smqssVideoAll">
        <div class="dialogBoxColor"></div>
        <div class="smqssVideoMasterBox">
            <animeModel1 
                fan_fm=""
                :videoUrl="MQSSVideoUrl"

                :fan1Url="fan1Url"
                :fan2Url="fan2Url"
            />
        </div>
        <div class="animeMsg">
            <animeModel2 
            :fan_fm="fan_fm"
            :fan_name="fan_name"
            :fan_ji_name="MQSSFanName"/>
        </div>
    </div>
</template>

<style scoped>
.smqssVideoAll{
    position: absolute;
    left: 0;
    top: 0;
    width: 1855px;
    height: 100%;
    /* background-color: red; */
    /* overflow: hidden; */
}
.dialogBoxColor{
    width: 100%;
    height: 6%;
    background: linear-gradient(to left,rgb(126,78,49),rgb(42,47,56));
}

.smqssVideoMasterBox{
    width: 100%;
    height: 94%;
}
.animeMsg{
    width: 100%;
    height: 80%;
}
</style>